<?
	include("include/common.php");
	include("include/header.php");
	$qr1 = mysql_query("SELECT users.*,bio.imagefile,bio.aboutme,bio.contact FROM users 
		LEFT JOIN bio ON bio.user=users.uid WHERE uid='$id'");
	$model = mysql_fetch_object($qr1);
?>
<h2>Browse <?=stripslashes($model->username)?></h2>
<div align=center>
<?=$table2?>
<tr>
	<td align=center>
<?
	if($model->imagefile){
?>
		<img src="<?=$siteurl?>/uploads/<?=$model->imagefile?>" border=0>
<?
	}
?>
	</td>
</table>
<br>
<?=$table2?>
<tr>
	<td colspan=10><strong>Model Details
<tr>
	<td><strong>First Name:
	<td><?=$model->first_name?>
	<td><strong>Last Name:
	<td><?=$model->last_name?>
<tr>
	<td><strong>Alias:
	<td><?=$model->username?>
	<td><strong>Email: </strong>
	<td><a href="mailto:<?=$model->email?>"><?=$model->email?></a>
</table>
<br>
<?=$table2?>
<tr>
	<td colspan=10><strong>Model Statistics
<tr>
	<td><strong>Age:
	<td><?=$model->age?>
	<td><strong>Height:
	<td><?=$model->height?>
<tr>
	<td><strong>Weight:
	<td><?=$model->weight?>
	<td><strong>Chest:
	<td><?=$model->chest?>
<tr>
	<td><strong>Eye Color:
	<td><?=$model->eyes?>
	<td><strong>Hair Color:
	<td><?=$model->hair?>
<tr>
	<td><strong>Dress Size:
	<td><?=$model->dress?>
	<td><strong>Shoe Size:
	<td><?=$model->shoe?>
</table>
<br>
<?=$table2?>
<tr>
	<td colspan=10><strong>Model Contact Info
<tr>
	<td><strong>Address: </strong>
	<td><?=$model->address?>
<tr>
	<td><strong>Street</strong>
	<td><?=$model->street?>
<tr>
	<td><strong>City</strong>
	<td><?=$model->city?>
<tr>
	<td><strong>Province / State</strong>
	<td><?=$model->state?>
<tr>
	<td><strong>Country</strong>
	<td><?=$model->country?>
<tr>
	<td><strong>Zip Code</strong>
	<td><?=$model->zip?>
</table>
<br>
<?=$table2?>
<tr>
	<td colspan=10><strong>General Information: </strong>
<tr>
	<td>
		<?=stripslashes(nl2br($model->aboutme))?>
</tr>
</table>
<br>
<?=$table2?>
<tr>
	<td colspan=10><strong>My Portfolio</strong>
<?
	$this->c=mysql_query("select * from portfolio where user='$id'");
	while( $this->d=mysql_fetch_object($this->c) ){
?>
	<tr>
		<td>
		<?=$table2?>
		<tr>
			<td colspan=4>
				<strong><?=stripslashes($this->d->title)?></a></strong>
			</td>
		</tr>
		<tr>
<?		if($this->d->imagefile){	?>
			<td align=center>
				<a href="<?=$siteurl?>/uploads/<?=$this->d->imagefile?>" target="_new">
					<img src="<?=$siteurl?>/uploads/<?=$this->d->imagefile?>" border=0 width="70" height="59">
				</a>
			</td>
<?		}	?>
<?		if($this->d->imagefile2){	?>
			<td align=center>
				<a href="<?=$siteurl?>/uploads/<?=$this->d->imagefile2?>" target="_new">
					<img src="<?=$siteurl?>/uploads/<?=$this->d->imagefile2?>" border=0 width="70" height="59">
				</a>
			</td>
<?		}	?>
<?		if($this->d->imagefile3){	?>
			<td align=center>
				<a href="<?=$siteurl?>/uploads/<?=$this->d->imagefile3?>" target="_new">
					<img src="<?=$siteurl?>/uploads/<?=$this->d->imagefile3?>" border=0 width="70" height="59">
				</a>
			</td>
<?		}	?>
<?		if($this->d->imagefile4){	?>
			<td align=center>
				<a href="<?=$siteurl?>/uploads/<?=$this->d->imagefile4?>" target="_new">
					<img src="<?=$siteurl?>/uploads/<?=$this->d->imagefile4?>" border=0 width="70" height="59">
				</a>
			</td>
<?		}	?>
		</tr>
		<tr>
			<td colspan=4>
				<?=nl2br($this->d->body)?>
			</td>
		</tr>
		</table>
		<br>
<?
	}
?>
	</td>
</tr>
</table>
	<br><br>
<?
	include("include/footer.php");
?>
<?
	function getCat($cat){
		$qr1 = mysql_query("SELECT name,parent FROM cats WHERE id='$cat'");
		$a = mysql_fetch_object($qr1);
		if ( $a->parent ){
			$hdr = getCat($a->parent);
		}
		if ($hdr){
			$a->name = $hdr." - ".$a->name;
		}else{
			$a->name = $a->name;
		}
		return $a->name;
	}
?>